import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isCollapse: false
  },
  mutations: {
    toggleCollapse(state, param) {
      state.isCollapse = param;
    }
  },
  actions: {
  },
  modules: {
    a: {
      namespaced: true,
      state: {
        name: 'a'
      },
      mutations: {
        setName(state, name) {
          state.name = name;
        }
      }

    },
    b: {
      state: {
        name: 'b'
      }
    }
  }
})
